package com.guide.resource;

import com.guide.service.GuideService;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("/guide")
public class GuideResource {

    @Inject
    GuideService guideService;

    @GET
    @Produces(MediaType.TEXT_PLAIN)
    public String guide(){
        return "guide";
    }

    @GET
    @Produces({MediaType.TEXT_PLAIN})
    @Path("/{name}")
    public String guide(@PathParam("name") String name){
        return guideService.guide(name);
    }
}
